#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/4/26 14:14
# @Author  : LiShan
# @Email   : lishan_1997@126.com
# @File    : frozen.py
# @Note    : this is note

import sys
import os

def app_path():
    """Returns the base application path."""
    if hasattr(sys, 'frozen'):
        # Handles PyInstaller
        return os.path.dirname(sys.executable) #使用pyinstaller打包后的exe目录
    return os.path.dirname(__file__)  #没打包前的py目录
